package Day04;

public class Test02 {
    public static void main(String[] args) {
        //++出现在变量后，先赋值，在对变量中保存的值进行自加1运算
        int a = 100;
        int b = a++;
        int c= ++a;
        System.out.println(a); //101
        System.out.println(b); //100
        System.out.println(c);
        //++出现在变量前，先进行自加1运算，在赋值
        int m = 10;
        int n = ++m;
        System.out.println(m);//11
        System.out.println(n);//11
        //出现在变量后，先赋值，在对变量中保存的值进行自减1运算
        int k = 100;
        int d = k--;
        System.out.println(k); //99
        System.out.println(d); //100
        //出现在变量前，先进行自减1运算，在赋值
        int e = 10;
        int f = --e;
        System.out.println(e);//9
        System.out.println(f);//9

    }
}
